package cn.gson.springboot.model.mapper.salemapper;

import cn.gson.springboot.model.pjos.*;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Repository
@Transactional
public interface ContractMapper {
    /**
     * 合同查询
     * @return
     */
    public List<Contract> contractInfo(@Param("deptId") Integer deptId,@Param("empId") Integer empId,@Param("type") Integer type,@Param("name") String name);

    /**合同详情
     * contid
     */
    public Contract contractDetails(@Param("contid")Integer contid);

    /**
     * 合同商机
     * @param customId
     * @return
     */
    public List<BusinessInfo> opportunityList(@Param("customId") Integer customId);

    /**
     * 合同报价单
     * @param customId
     * @return
     */
    public List<Offer> contOfferDetails(@Param("customId") Integer customId,@Param("busId")Integer busId);

    /**
     * 付款方式
     */
    public List<TermsPayment> paymentDetails();


    /**
     * 新增订单查询合同
     * @param empid
     * @return
     */
    public List<Contract> addOrderInfo(Integer empid,String name);

    /**
     * 合同名称
     */
    public String selectMaxContractName();
    /**
     * 订单编号
     * @return
     */
    public String selectMaxOrdertName();

    /**
     * 重复购买
     */
    public Integer contrCustomType(Integer customerId);

    /**
     * 发货单编号
     */
    public String selectMaxZfhuodanName();

}
